package com.altorithm;

/**
 * @Classname BubbleSort
 * @Date 2019/9/25 10:16
 * @auther by hqy
 */
public class BubbleSort {


    public static void sort(int[] array) {
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array.length -1- i; j++) {
                if (array[j] > array[j+1]) {
                    Common.swag(array, j, j+1);
                }

            }
        }

    }
}
